﻿using System;
using System.IO;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using EzDesk.DesktopClient.ViewContract;
using EzDesk.Generic;

namespace EzDesk.DesktopClient.View
{
    /// <summary>
    /// Interaction logic for TodoView.xaml
    /// </summary>
    public partial class TodoView : UserControl, ITodoView
    {
        public TodoView()
        {
            InitializeComponent();
        }

        #region ITodoView Members

        public event EventHandler<GenericEventArg<string>> OnNavigate;
        public event EventHandler OnClose;

        public object ViewModel
        {
            get { return DataContext; }
            set { DataContext = value; }
        }

        #endregion

        private void ContentControl_RequestNavigate(object sender, RequestNavigateEventArgs e)
        {
            OnNavigate.ExecuteMethod(null,e.Uri.AbsoluteUri);
        }

        private void DisableNotificationBtn_Click(object sender, RoutedEventArgs e)
        {
            OnClose(null, null);
        }
    }
}
